home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / csounds / telephon.c < prev    next >
Text File  |  1988-08-17  |  396b  |  27 lines

  1. #define FALSE 0
  2. #define TRUE 1
  3.  
  4. void telephone()
  5. {
  6.  
  7.   int  done = FALSE;
  8.   int  i;
  9.  
  10.   do {
  11.     for (i = 1; i <= 20; i++) {
  12.       sound(523);
  13.       delay(40);
  14.       sound(659);
  15.       delay(40);
  16.     }
  17.     nosound();
  18.     for (i = 1; i <= 800; i++) {
  19.       if (kbhit()) {
  20.         done = TRUE;
  21.         break;
  22.       }
  23.       delay(1);
  24.     }
  25.   } while (!(done));
  26.   nosound();
  27. }